﻿using System;
using System.Linq;
using System.Collections.Generic;

namespace ForumsBrowser.BusinessObjects
{
    public class Forum
    {
        public Forum()
        {
            
            Threads = new List<Thread>();
        }

        public string LongName { get; set; }
        public string ShortName { get; set; }
        public Guid Id { get; set; }
        public DateTime? Updated { get; set; }
        public IList<Thread> Threads { get; set; }
        public bool IsSelected { get; set; }
    

        public override bool Equals(object obj)
        {
            return obj != null && (obj is Forum) && (obj as Forum).Id == this.Id;
        }

        public override int GetHashCode()
        {
            return this.Id.GetHashCode();
        }
    }
}
